package pipe

import (
	"errors"
	"time"
)

const (
	DefaultKeepAlive = time.Minute
	FieldKey         = "key"
	FieldSN          = "sn"

	Connect   Type = "connect"  //通讯,建立新的链接
	Write     Type = "write"    //透传,写数据
	Close     Type = "close"    //通讯,关闭链接
	Register  Type = "register" //通讯,注册
	Shell     Type = "shell"    //通讯,执行脚本
	Info      Type = "info"     //通讯,和服务端建立通讯
	KeyPrefix      = `{"key":"`
)

var (
	ErrPortBind    = errors.New("端口已被绑定")
	ErrNoConnected = errors.New("未连接")
)

type Type string
